import { createApp } from 'vue'
import App from './App.vue'
const app = createApp(App)
import router from './router'
import store from './store'
import 'normalize.css'
import '@/assets/styles/common.scss'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
app.use(ElementPlus, {
  locale: zhCn,
})
// 注册全局组件
import components from '@/components/index'
app.use(components)
// 注册全局指令
import * as directives from '@/directives'

import('@/permission')

Object.keys(directives).forEach(key=>{
  app.directive(key,directives[key])
})

app.use(store).use(router).mount('#app')
